package com.copa.controller;

import cn.hutool.core.date.DateUtil;
import com.copa.service.FunctionAssistant;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author copa
 * @date 2025/8/17 22:01
 * @description:
 */
@RestController
@Slf4j
public class ChatFunctionCallingController {

    @Resource
    private FunctionAssistant functionAssistant;

    @GetMapping(value = "/chatfunction/test1")
    public String test1() {
        String chat = functionAssistant.chat("开张发票,公司：小c公司 税号：copa659 金额：1145.14");
        System.out.println(chat);
        return "success : " + DateUtil.now() + "\t" + chat;
    }
}
